home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-03 | 43.9 KB | 1,157 lines |
- C.S.M.P. Digest Thu, 16 Apr 92 Volume 1 : Issue 50
-
- Today's Topics:
-
- Launching app from INIT (again)
- DRVR or background: which is better?
- Another MacsBug question...
- Is TextEdit the best solution?
- PBVolumeMount Weirdness!!!
- adding small icon to a cell of a list
- How to force Finder filesize etc. update after THINK C stdio?
- Drawing a Picture in a Modal Dialog?
- List manager problem
- Help! Filling a rect with a uniform color
- iostream package for Think C?
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- These digests are available (by using FTP, account anonymous, your email
- address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
- edu. This is also the home of the comp.sys.mac.programmer Frequently Asked
- Questions list. The last several issues of the digest are available from
- sumex-aim.stanford.edu as well.
-
- These digests are also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new digest as it is created.
-
- The articles in these digests are taken directly from comp.sys.mac.programmer.
- They are not edited; all articles included in this digest are in their original
- posted form. The only articles that are -not- included in these digests are
- those which didn't receive any replies (except those that give information
- rather than ask a question). All replies to each article are concatenated
- onto the original article in the order in which they were received. Article
- threads are not added to the digests until the last article added to the
- thread is at least one month old (this is to ensure that the thread is dead
- before adding it to the digests).
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
- -------------------------------------------------------
-
- From: jverdega@cae.wisc.edu (Jeffrey Verdegan)
- Subject: Launching app from INIT (again)
- Date: 9 Mar 92 16:43:50 GMT
- Organization: Computer Aided Engineering, Univ. of Wisconsin-Madison
-
- A while ago, I posted a question asking how to launch an application from an
- INIT. As I haven't gotten any responses yet, I'll make a pest of myself :-)
- and post again.
-
- Hence, how do I launch an application from an INIT? Note, I have no problem
- with RTFM, if somebody will give me a clue as to which one. I've looked in
- all the IM volumes' indices under "Launch" (even VI, and although there was
- plenty of info on the process manager, my program has to work under system 6)
- IM-II had one or two paragraphs on _Launch, but it didn't seem particularly
- useful.
-
- Help? Please?
-
- - ----------
-
- Jeff Verdegan
- University of Wisconsin-Madison
- Computer-Aided Engineering Center
- jjv@caestaff.engr.wisc.edu
- (608) 263-1875
-
- +++++++++++++++++++++++++++
-
- From: ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser)
- Date: 13 Mar 92 19:32:52 GMT
- Organization: MacDTS, Apple Computer
-
- In article <1992Mar9.104350.851@doug.cae.wisc.edu>, jverdega@cae.wisc.edu (Jeffrey Verdegan) writes:
- > Hence, how do I launch an application from an INIT?
-
- What do you really want to do? Launching an application from an INIT is a
- pretty bad idea; the system software is not finished setting itself up, the
- process manager hasn't started up yet, etc, etc. You need to ask the real
- question: How do I do x? Now what do you want to do?
-
- Do you want an application to always start up when the machine is booted?
- Do you want to replace the Finder?
- Do you want to do a task before the Finder starts, and you want to do it from
- an application?
-
- All these problems would have different solutions. You need to ask the right
- question in order to get a reasonable answer.
-
- Most of the time, when people post questions to csmp and don't get an answer,
- it's because they haven't phrased their question in a way to make it anything
- but an annoyance to answer.
-
- Tim Dierks
- MacDTS, but I speak for myself
-
- +++++++++++++++++++++++++++
-
- From: jverdega@cae.wisc.edu (Jeffrey Verdegan)
- Organization: College of Engineering, Univ. of Wisconsin-Madison
- Date: 14 Mar 92 13:40:34 CST
-
- In article <21492@goofy.Apple.COM> ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser) writes:
- >In article <1992Mar9.104350.851@doug.cae.wisc.edu>, jverdega@cae.wisc.edu (Jeffrey Verdegan) writes:
- >> Hence, how do I launch an application from an INIT?
- >
- >What do you really want to do? Launching an application from an INIT is a
- >pretty bad idea; the system software is not finished setting itself up, the
- >process manager hasn't started up yet, etc, etc. You need to ask the real
- >question: How do I do x? Now what do you want to do?
- >
- >Do you want an application to always start up when the machine is booted?
- >Do you want to replace the Finder?
- >Do you want to do a task before the Finder starts, and you want to do it from
- > an application?
- >
- >All these problems would have different solutions. You need to ask the right
- >question in order to get a reasonable answer.
- >
- >Most of the time, when people post questions to csmp and don't get an answer,
- >it's because they haven't phrased their question in a way to make it anything
- >but an annoyance to answer.
- >
- >Tim Dierks
- >MacDTS, but I speak for myself
-
- Okay, I realize now that I phrased my question badly, but at the time I posted,
- I wasn't really aware of the difference between an INIT and a stand alone code
- resource, and of the fact that at INIT time, all the stuff needed to launch
- an app has not been set up yet. I guess now that it's been pointed out to me,
- I realize I should have known, if I had really thought about it. Sorry for
- the lack of clarity.
-
- Anyway, here's the scenario: I have an INIT that patches a trap (PBControl,
- to be exact). I want to perform certain actions whenever someone logs in to
- an AppleShare volume (actually, a NetWare volume, but I make the distinction
- inside the patch). One of the things I want to do, after the patch is finished
- with everything else, is to launch an application. So, as several people
- surmised, launching from the INIT is not actually what I want to do. Launching
- from the trap is. By the way, it's a head patch, not a tail patch, if that
- makes a difference.
-
- I've already gotten several responses that answer my question of basic
- strategy, (Thanks everyone! =:-) ), so I should be able to make something work
- with that, but if there's any canned code out there that will do it, I don't
- really feel a need to re-invent the wheel on this one.
-
-
- Later,
- Jeff
-
-
- - ----------
-
- Jeff Verdegan
- University of Wisconsin-Madison
- Computer-Aided Engineering Center
- jjv@caestaff.engr.wisc.edu
- (608) 263-1875
-
-
-
- ---------------------------
-
- From: jjohnson@ewsvax.mdcbbs.com
- Subject: DRVR or background: which is better?
- Date: 10 Mar 92 08:05:04 GMT
- Organization: McDnDSpaceSys, Huntington Bch, CA
-
- Hi everyone,
-
- I'm building a program to open a TCP connection over a socket on startup (or
- close to it) and listen for a response from a host (i.e. an event happens on
- the host and a server sitting on the host will send a "bip" over the connection
- to the Mac). When the Mac gets the response it will tweak the Notification
- Manager. All the Macs are running 6.0.x or 7 and have MacTCP.
-
- Now for the $64 question....Should this be done as a DRVR (installed by an
- INIT at startup) or as a background app? I don't think I need to patch anything
- as long as I can be assured of getting some of the CPU once in a while (it's not
- terribly important I get called the second that chars are available). A
- background app would make our user support organization less nervous, just
- simply because it "isn't another INIT to worry about". BTW, there will be some
- prefs data input from the user (i.e. type of host event to watch for)... just
- a string or two which I was thinking on gathering with a cdev (or could I get
- it with a window attached to the DRVR/DA...this DRVR could be a DA, right?)
-
- If it's done as a background app, what's different about a background app
- besides the OnlyinBackground flag in the SIZE resource (and no window calls)?
- Does anyone have an example of a simple background app or point me to where I
- can find source to one (C, Pascal, I'm not picky)...
-
- Thanks in advance...!
-
- - -Jeff Johnson
- jjohnson%ewsvax.decnet@mdcgwy.mdc.com
-
- +++++++++++++++++++++++++++
-
- From: aw0g+@andrew.cmu.edu (Aaron Wohl)
- Date: 11 Mar 92 13:16:53 GMT
- Organization: Special Projects, Carnegie Mellon, Pittsburgh, PA
-
- For an example of dothing this see host akutatak anonymous ftp
- /aw0g/mailcheck.sit.hqx.
-
- This is an init/drvr/cdev collection to check unix mail and pop up a
- notification manager alert (or blink the apple or play a sound) when
- mail comes in. Think C sources are included.
-
- Aaron
-
- +++++++++++++++++++++++++++
-
- From: zobkiw@world.std.com (Joe Zobkiw)
- Organization: The World Public Access UNIX, Brookline, MA
- Date: Wed, 11 Mar 1992 19:47:16 GMT
-
- Jeff - You might also want to look into writing a "Daemon" which is the
- best of both worlds. It's like a background application yet it doesn't
- have any interface at all (so, it's like a DRVR)
-
- I think it is discussed in IM VI as well as one of the later Dev CDs which
- has some example code.
-
-
-
-
-
-
- - --
- <--------------------------------------------------->
- joe zobkiw zobkiw@world.std.com
- mac.synthesis.MIDI.development.C.asm.communications
- >---------------------------------------------------<
-
- +++++++++++++++++++++++++++
-
- From: resnick@cogsci.uiuc.edu (Pete Resnick)
- Date: 11 Mar 92 21:27:15 GMT
- Organization: University of Illinois at Urbana
-
- jjohnson@ewsvax writes:
-
- [...]
-
- >All the Macs are running 6.0.x or 7 and have MacTCP.
-
- [...]
-
- >Should this be done as a DRVR (installed by an INIT at startup) or as a
- >background app?
-
- Things to help you decide:
-
- Why it should be an application:
- - --------------------------------
- 1. **Much** easier to code and debug. Source level debugging is much
- nicer with apps.
- 2. Doesn't take up a device driver entry in the table.
- 3. Communication with it is cake under System 7 using AppleEvents and
- the Process Manager.
- 4. Avoid "another INIT to worry about".
-
- Why it should be a driver:
- - --------------------------
- 1. Needs to run under Finder because Multifinder might not be there.
- 2. Need to be able to communicate with it easily under System 6.0.x.
- There ain't no Process Manager in System 6.
- 3. You need to write an INIT to launch the application under System 6
- anyway, so you might as well just write the driver.
- 4. I'm just like Pete and I like mucking around with other people's
- heaps instead of having one of my own.
-
- If none of the reasons under "Why it should be a driver" are overwhelming,
- write it as an application and make everybody much calmer.
-
- pr
- - --
- Pete Resnick (...so what is a mojo, and why would one be rising?)
- Graduate assistant - Philosophy Department, Gregory Hall, UIUC
- System manager - Cognitive Science Group, Beckman Institute, UIUC
- Internet: resnick@cogsci.uiuc.edu
-
- +++++++++++++++++++++++++++
-
- From: sasdtm@stthomas.unx.sas.com (Donald T. Major)
- Organization: SAS Institute Inc.
- Date: Fri, 13 Mar 1992 18:59:40 GMT
-
- In article <1992Mar11.212715.24317@ux1.cso.uiuc.edu>, resnick@cogsci.uiuc.edu (Pete Resnick) writes:
- [many true & useful statements deleted]
- |> 3. You need to write an INIT to launch the application under System 6
- |> anyway, so you might as well just write the driver.
-
- Not true. System 6 supports the concept of startup applications--you
- just set it up via the Startup... menu item under Special.
-
- ..
- dtm
-
- - --
- Donald Major SAS Institute Inc. "Cicely, let's fling something!"
- sasdtm@unx.sas.com SAS Campus Drive - Northern Exposure
- (919) 677-8000 Cary, NC 27513-2414
-
- ---------------------------
-
- From: speth@cats.ucsc.edu (James Gustave)
- Subject: Another MacsBug question...
- Date: 11 Mar 92 01:46:01 GMT
- Organization: University of California, Santa Cruz
-
-
- When you're debugging with MacsBug, how can you find out where in the file
- (ie. position in whatever CODE resource) you are looking at??
-
- Also, since I'm already posting something anyway...
- When I post news I get a message warning me of the extravagant cost of my
- actions. Is this true or is this a joke? Just wondering...
-
-
- - --
- Jim Speth
- speth@cats.ucsc.edu
-
- +++++++++++++++++++++++++++
-
- From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
- Date: 13 Mar 92 15:59:13 GMT
- Organization: University of Illinois at Urbana-Champaign
-
- speth@cats.ucsc.edu (James Gustave) writes:
- >When you're debugging with MacsBug, how can you find out where in the file
- >(ie. position in whatever CODE resource) you are looking at??
-
- how, sc, and sc7 all print useful information.
-
- What they give you is routine name and an offset. Finding that in your
- source can be difficult. You can use the "il" command to list instructions
- until you can figure out just where you are (subroutine calls can be a big
- help). Personally, I print out an UltraSlimFast listing of all my source
- from time to time, which makes this very easy. (UltraSlimFast is a freeware
- MPW tool that prints a combined source code & assembly listing.)
-
- >When I post news I get a message warning me of the extravagant cost of my
- >actions. Is this true or is this a joke?
-
- It's becoming less true as time goes on and fewer sites are paying
- large marginal costs for article transmission.
- - --
- Steve Dorner, U of Illinois Computing Services Office
- Internet: s-dorner@uiuc.edu UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
-
- ---------------------------
-
- From: speth@cats.ucsc.edu (James Gustave)
- Subject: Is TextEdit the best solution?
- Date: 11 Mar 92 01:48:48 GMT
- Organization: University of California, Santa Cruz
-
-
- One feature of my latest project is a simple terminal program.
- What seems like the most elegant way of displaying the test coming in?
- Should I use TextEdit or just use DrawChar?
- Thanks.
-
-
- - --
- Jim Speth
- speth@cats.ucsc.edu
-
- +++++++++++++++++++++++++++
-
- From: jmunkki@hila.hut.fi (Juri Munkki)
- Date: 11 Mar 92 14:59:57 GMT
- Organization: Helsinki University of Technology, Finland
-
- In article <30382@darkstar.ucsc.edu> speth@cats.ucsc.edu (James Gustave) writes:
- >One feature of my latest project is a simple terminal program.
- >What seems like the most elegant way of displaying the test coming in?
- >Should I use TextEdit or just use DrawChar?
-
- Both are wrong. Using TextEdit is totally unacceptable and DrawChar
- requires more work than is necessary is also slower than optimal.
-
- The easiest solution is to use the communications toolbox, since it
- provides terminal emulation features. You only have to learn how to
- use it and that's it. I think the latest Develop had an article on
- how to use the terminal stuff.
-
- If you still need to write your own terminal emulation code, use
- DrawText or DrawString instead. Try to draw as many characters
- as possible with one call to DrawText. Buffer all incoming characters
- into an internal buffer and draw the buffered characters only when
- the cursor moves or you are about to process events. This will
- provide extremely smooth and fast text output.
-
- ____________________________________________________________________________
- / Juri Munkki / Helsinki University of Technology / Wind / Project /
- / jmunkki@hut.fi / Computing Center Macintosh Support / Surf / Arashi /
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- +++++++++++++++++++++++++++
-
- From: time@ice.com (Tim Endres)
- Date: 14 Mar 92 02:55:54 GMT
- Organization: ICE Engineering, Inc.
-
-
- In article <1992Mar11.145957.28947@nntp.hut.fi> (comp.sys.mac.programmer), jmunkki@hila.hut.fi (Juri Munkki) writes:
- > The easiest solution is to use the communications toolbox, since it
- > provides terminal emulation features. You only have to learn how to
- > use it and that's it. I think the latest Develop had an article on
- > how to use the terminal stuff.
-
- AGREED! CTB all the way.
-
-
- tim endres - time@ice.com -or- uupsi!tbomb!time
- ICE Engineering, Inc. - Phone (313) 449 8288 - FAX (313) 449-9208
- 8840 Main Street, Whitmore Lake, MI 48189
- USENET - a slow moving self parody... ph
-
- ---------------------------
-
- From: jamesbo@microsoft.com (James Borquist)
- Subject: PBVolumeMount Weirdness!!!
- Date: 11 Mar 92 18:42:52 GMT
- Organization: Microsoft Corp.
-
- Hi there!
- I was just playing around with this new (well, not so new now, but new to
- me) File Manager call PBVolumeMount. I have found that on AppleShare servers
- that allow guests to connect, but have volumes that require passwords (at
- least in the Chooser!) I can mount the volume. Of course, the volume
- disappears after about 1/2 of a second, but the weird thing is that it does
- mount. Now, my questions are:
-
- 1. Why do I not get an error from PBVolumeMount when I mount a volume like
- this?
-
- 2. If the answer is that this is an access privilege related thing, then
- is there any way to find out when I'm trying to mount a volume like
- this?
-
- Thanks!
- James
-
- +++++++++++++++++++++++++++
-
- From: tjc@pacvax.pacersoft.com (Tom Colley)
- Date: 12 Mar 92 13:46:14 GMT
- Organization: Pacer Software, Inc.
-
- In article <1992Mar11.184252.10634@microsoft.com>, jamesbo@microsoft.com (James Borquist) writes:
- >
- > Hi there!
- > I was just playing around with this new (well, not so new now, but new to
- > me) File Manager call PBVolumeMount. I have found that on AppleShare servers
- > that allow guests to connect, but have volumes that require passwords (at
- > least in the Chooser!) I can mount the volume. Of course, the volume
- >
- > Thanks!
- > James
- >
-
- I have noticed this also, and quite a while ago had sent a bug report to
- Apple concerning PBVolumeMount and password protected volumes. Aliases to
- password protected volumes do not work either. I never received a
- satisfactory response about the situation.
-
- What I saw: Even though all of the information for the server, volume, user,
- and volume password is correct (and put together correctly in the
- AFPVolMountInfo struct, the password does not make it to the AFPOpenVol
- packet that gets out on the network, hence the call will fail at the
- server with an AccessDenied (that is what the server should do) (the
- volume password is sent to the server in the AFPOpenVol call).
-
- With password protected volumes on Pacer's PacerShare UNIX fileservers, the
- AFPVolMountInfo does return an AccessDenied (-5000). I'm willing to bet
- some sum of money ($0.02) that the fileserver you are using is blowing the
- error code on the AFPOpenVol call, and that after a subsequent
- AFPGetDirParms to get access rights to the base of the volume, the Mac
- realizes it has a volume that it has no privs to, and unmounts it.
-
- Tom Colley
- <tjc@pacersoft.com> <tjc%pacvax@uunet.uu.net>
- /* Watch my return address, it may be wrong */
-
- (In case anyone is wondering, PacerShare is an AppleShare file server that
- runs on UNIX and VMS. Call 508 898 3300 for more info.)
-
- +++++++++++++++++++++++++++
-
- From: dcastell@csg.uwaterloo.ca (David Castell)
- Date: 12 Mar 92 17:39:13 GMT
- Organization: Computer Systems Group
-
- In article <562@pacvax.UUCP>, tjc@pacvax.pacersoft.com (Tom Colley) writes:
- >
- > In article <1992Mar11.184252.10634@microsoft.com>, jamesbo@microsoft.com (James Borquist) writes:
- > >
- > > Hi there!
- > > I was just playing around with this new (well, not so new now, but new to
- > > me) File Manager call PBVolumeMount. I have found that on AppleShare servers
- > > that allow guests to connect, but have volumes that require passwords (at
- > > least in the Chooser!) I can mount the volume. Of course, the volume
- > >
- > > Thanks!
- > > James
- > >
- >
- > I have noticed this also, and quite a while ago had sent a bug report to
- > Apple concerning PBVolumeMount and password protected volumes. Aliases to
- > password protected volumes do not work either. I never received a
- > satisfactory response about the situation.
- >
- > What I saw: Even though all of the information for the server, volume, user,
- > and volume password is correct (and put together correctly in the
- > AFPVolMountInfo struct, the password does not make it to the AFPOpenVol
- > packet that gets out on the network, hence the call will fail at the
- > server with an AccessDenied (that is what the server should do) (the
- > volume password is sent to the server in the AFPOpenVol call).
- >
- > With password protected volumes on Pacer's PacerShare UNIX fileservers, the
- > AFPVolMountInfo does return an AccessDenied (-5000). I'm willing to bet
- > some sum of money ($0.02) that the fileserver you are using is blowing the
- > error code on the AFPOpenVol call, and that after a subsequent
- > AFPGetDirParms to get access rights to the base of the volume, the Mac
- > realizes it has a volume that it has no privs to, and unmounts it.
- >
- > Tom Colley
- > <tjc@pacersoft.com> <tjc%pacvax@uunet.uu.net>
- > /* Watch my return address, it may be wrong */
- >
- > (In case anyone is wondering, PacerShare is an AppleShare file server that
- > runs on UNIX and VMS. Call 508 898 3300 for more info.)
- >
- >
- I also found this bug in System 7 and traced through the operating system
- to see what the problem was. Apparently, the PBVolumeMount routine never
- uses the Volume Password that is passed to it. It completely ignores it!
- The response I got was that it was definitely a bug and that AppleShare 3.0
- drivers has its own version of PBVolumeMount which will provide a working
- call to System 6 and System 7 user's alike. They didn't say when this would
- be fixed in System 7.
-
- Hope this is of some help.
-
- Dave Castell
-
- +++++++++++++++++++++++++++
-
- From: cmcclary@indiana.edu (Charles McClary)
- Organization: Indiana University
- Date: Thu, 12 Mar 92 21:06:44 GMT
-
- In article <1992Mar12.173913.12224@watserv1.waterloo.edu>, dcastell@csg.uwaterloo.ca (David Castell) writes:
- >
- > In article <562@pacvax.UUCP>, tjc@pacvax.pacersoft.com (Tom Colley) writes:
- > >
- > > In article <1992Mar11.184252.10634@microsoft.com>, jamesbo@microsoft.com (James Borquist) writes:
- > > >
- > > > Hi there!
- > > > I was just playing around with this new (well, not so new now, but new to
- > > > me) File Manager call PBVolumeMount. I have found that on AppleShare servers
- > > > that allow guests to connect, but have volumes that require passwords (at
- > > > least in the Chooser!) I can mount the volume. Of course, the volume
- > > >
- > > > Thanks!
- > > > James
- > > >
- > >
- > > I have noticed this also, and quite a while ago had sent a bug report to
- > > Apple concerning PBVolumeMount and password protected volumes. Aliases to
- > > password protected volumes do not work either. I never received a
- > > satisfactory response about the situation.
- > >
- > > What I saw: Even though all of the information for the server, volume, user,
- > > and volume password is correct (and put together correctly in the
- > > AFPVolMountInfo struct, the password does not make it to the AFPOpenVol
- > > packet that gets out on the network, hence the call will fail at the
- > > server with an AccessDenied (that is what the server should do) (the
- > > volume password is sent to the server in the AFPOpenVol call).
- > >
- > > With password protected volumes on Pacer's PacerShare UNIX fileservers, the
- > > AFPVolMountInfo does return an AccessDenied (-5000). I'm willing to bet
- > > some sum of money ($0.02) that the fileserver you are using is blowing the
- > > error code on the AFPOpenVol call, and that after a subsequent
- > > AFPGetDirParms to get access rights to the base of the volume, the Mac
- > > realizes it has a volume that it has no privs to, and unmounts it.
- > >
- > > Tom Colley
- > > <tjc@pacersoft.com> <tjc%pacvax@uunet.uu.net>
- > > /* Watch my return address, it may be wrong */
- > >
- > > (In case anyone is wondering, PacerShare is an AppleShare file server that
- > > runs on UNIX and VMS. Call 508 898 3300 for more info.)
- > >
- > >
- > I also found this bug in System 7 and traced through the operating system
- > to see what the problem was. Apparently, the PBVolumeMount routine never
- > uses the Volume Password that is passed to it. It completely ignores it!
- > The response I got was that it was definitely a bug and that AppleShare 3.0
- > drivers has its own version of PBVolumeMount which will provide a working
- > call to System 6 and System 7 user's alike. They didn't say when this would
- > be fixed in System 7.
- >
- > Hope this is of some help.
- >
- > Dave Castell
- >
- >
- I was trying to use PBVolumeMount to an AppleShare volume as a guest and it
- bounced with a -58 (which states: volume in question belongs to an external
- file system). I assume, from the previous discussions, that I have fallen
- into the same bug.
-
- Is there another, reliable, way to mount an AppleShare volume?
-
- Thanks,
- Charles McClary
- cmcclary@indiana.edu
-
-
-
- +++++++++++++++++++++++++++
-
- From: tjc@pacvax.pacersoft.com (Tom Colley)
- Date: 13 Mar 92 14:40:56 GMT
- Organization: Pacer Software, Inc.
-
- In article <1992Mar12.210644.26258@bronze.ucs.indiana.edu>, cmcclary@indiana.edu (Charles McClary) writes:
- > In article <1992Mar12.173913.12224@watserv1.waterloo.edu>, dcastell@csg.uwaterloo.ca (David Castell) writes:
- > > In article <562@pacvax.UUCP>, tjc@pacvax.pacersoft.com (Tom Colley) writes:
- > > > In article <1992Mar11.184252.10634@microsoft.com>, jamesbo@microsoft.com (James Borquist) writes:
- > > > > Hi there!
- > > > > I was just playing around with this new (well, not so new now, but new to
- > > > > me) File Manager call PBVolumeMount. I have found that on AppleShare servers
- > > > > that allow guests to connect, but have volumes that require passwords (at
- > > > > least in the Chooser!) I can mount the volume. Of course, the volume
-
- [...lots of stuff deleted...]
-
- > I was trying to use PBVolumeMount to an AppleShare volume as a guest and it
- > bounced with a -58 (which states: volume in question belongs to an external
- > file system). I assume, from the previous discussions, that I have fallen
- > into the same bug.
- >
- > Is there another, reliable, way to mount an AppleShare volume?
- >
- > Thanks,
- > Charles McClary
- > cmcclary@indiana.edu
- >
-
- I had problems with logging in as guest also (but eventually had success!).
- The trick was to make sure that the userNameOffset field points to a valid
- place in the AFPVolMountInfo structure, and that it points to an empty string.
- Use the guest UAM as if you were supplying a username and password, but
- make sure the username and password are empty (for Pascal strings, make sure
- the length byte is zero). If the username field was not empty, I would
- get a -5019, which is an AFP ParamErr. I've never seen a -58. Of course,
- logging in as guest only works for non-password protected volumes, as
- discussed in previous postings.
-
- Tom Colley
- <tjc@pacersoft.com> <tjc%pacvax@uunet.uu.net>
- /* Watch my return address, it may be wrong */
-
- ---------------------------
-
- From: wkfu@netcom.com (Wilson Fu)
- Subject: adding small icon to a cell of a list
- Date: 12 Mar 92 07:42:45 GMT
- Organization: Netcom, Bay Area, CA
-
- Wondering is there any easy way to do the above? The list manager does not
- seem to support adding a samll icon to its cell. Any help would be greatly
- appreciated.
-
- Regards,
- Wilson.
- - --
- Wilson Fu (Nocturnal Bug) e-mail: wkfu@netcom.com
-
- +++++++++++++++++++++++++++
-
- From: jpurlia@qualcomm.com (John Purlia)
- Organization: Qualcomm, Inc
- Date: Thu, 12 Mar 1992 23:58:52 GMT
-
- In article <hz3h35kwkfu@netcom.com> wkfu@netcom.com (Wilson Fu) writes:
- > Wondering is there any easy way to do the above? The list manager does
- not
- > seem to support adding a samll icon to its cell. Any help would be
- greatly
- > appreciated.
-
- That's correct, the list manager's standard LDEF is a text only list. In
- order to display small icons in a cell, you need a custom LDEF which draws
- icons in the cells. Luckily, an LDEF is one of the simpler defProcs to
- write (as it basically just needs a draw routine), and luckier still,
- there is an excellent small icon LDEF example included in Apple's DTS
- Sample Code folder.
-
- - -- John
-
- ...........................................................................
- John Purlia : My brain; not my company's brain. My brain says...
- jpurlia@qualcomm.com : "Just about any movie could be made better
- AOL: <Jpurlia> : if one of the characters were a vampire."
- ...........................................................................
-
- ---------------------------
-
- From: swofford@uxh.cso.uiuc.edu (David Swofford )
- Subject: How to force Finder filesize etc. update after THINK C stdio?
- Date: 12 Mar 92 18:00:32 GMT
- Organization: University of Illinois at Urbana
-
- If a Finder window is open and the size of a file is changed using THINK
- C 5.0 stdio after the Finder first sees the file, it doesn't seem to
- update the file size and other Finder info properly. The simplest
- example of this is:
-
- Open a Finder window containing file 'foo.txt' in list mode (i.e., by
- name, size, etc.).
- Do the following:
-
- fp = fopen("foo.text", "a");
- [write a bunch of stuff to fp]
- fclose(fp);
- [exit program]
-
- The file size displayed in the Finder doesn't change no matter how many
- bytes (or kilobytes, or megabytes) you write to it. If you close the
- window and reopen, it displays the correct size. Obvious things like
- calling SetFInfo etc. don't help.
-
- In pre-System 7 versions of the OS, I found by trial-and-error that I
- could force the Finder to update the file size and other info by
- creating a new temporary file and immediately deleting it. Somehow,
- messing with the directory entries caused the Finder to recollect its
- information about the files. Even this doesn't seem to work under
- System 7. Under System 6 and earlier, this bug/feature was particular
- annoying because copies mediated by the Finder (including duplicate,
- etc.) used the Finder's incorrect notion of the file size correct and
- did bizarre things such as spilling the progress bar outside of the
- thermometer display, rapid multiple flashing back and forth between
- reading and writing, etc.
-
- I imagine that this has come up before in this group, but I don't
- remember anything about it and there was no mention in the FAQ list.
- Any suggestions on how I can FORCE the Finder to update its info from
- within my app would be appreciated.
- - --
- David L. Swofford Phone: (217)244-6959
- Illinois Natural History Survey FAX: (217)333-4949
- 607 E. Peabody Drive BITNET: DAVESWOF@UIUCVMD
- Champaign, Illinois 61820 USA Internet: swofford@uxh.cso.uiuc.edu
-
- +++++++++++++++++++++++++++
-
- From: d88-jwa@byse.nada.kth.se (Jon W{tte)
- Date: 13 Mar 92 17:09:13 GMT
- Organization: Royal Institute of Technology, Stockholm, Sweden
-
- .cso.uiuc.edu> swofford@uxh.cso.uiuc.edu (David Swofford ) writes:
-
- The file size displayed in the Finder doesn't change no matter how many
- bytes (or kilobytes, or megabytes) you write to it. If you close the
- window and reopen, it displays the correct size. Obvious things like
- calling SetFInfo etc. don't help.
-
- The apple-sanctioned way is to change the modified date
- of the enclosing folder.
-
- >From the limitless depths of my hairy, ever-growing utilities.c
- file:
-
- OSErr
- TouchDir ( short vol , long dir )
- {
- CInfoPBRec info ;
- Name name ;
- OSErr err ;
-
- BlockClear ( & info , sizeof ( info ) ) ;
- info . dirInfo . ioDrDirID = dir ;
- info . dirInfo . ioVRefNum = vol ;
- info . dirInfo . ioNamePtr = name ;
- info . dirInfo . ioFDirIndex = -1 ;
-
- err = PBGetCatInfo ( & info , 0 ) ;
-
- if ( ! err ) {
-
- info . dirInfo . ioCompletion = 0 ;
- info . dirInfo . ioDrDirID = info . dirInfo . ioDrParID ;
- info . dirInfo . ioFDirIndex = 0 ;
- GetDateTime ( & ( info . dirInfo . ioDrMdDat ) ) ;
-
- err = PBSetCatInfo ( & info , 0 ) ;
- }
-
- return err ;
- }
-
-
- The implementation is left as an exercise to the reader.
-
- - --
- This signature is placed into the Public Domain by Jon W{tte (h+@nada.kth.se)
- - The worlds only romantic cynic -
-
- +++++++++++++++++++++++++++
-
- From: David.Swofford@macnet.omahug.org (David Swofford)
- Date: 13 Mar 92 00:00:32 GMT
- Organization: Macnet Omaha
-
- (From: swofford@uxh.cso.uiuc.edu (David Swofford ))
- (Organization: University of Illinois at Urbana)
-
- If a Finder window is open and the size of a file is changed using THINK
- C 5.0 stdio after the Finder first sees the file, it doesn't seem to
- update the file size and other Finder info properly. The simplest
- example of this is:
-
- Open a Finder window containing file 'foo.txt' in list mode (i.e., by
- name, size, etc.).
- Do the following:
-
- fp = fopen("foo.text", "a");
- [write a bunch of stuff to fp]
- fclose(fp);
- [exit program]
-
- The file size displayed in the Finder doesn't change no matter how many
- bytes (or kilobytes, or megabytes) you write to it. If you close the
- window and reopen, it displays the correct size. Obvious things like
- calling SetFInfo etc. don't help.
-
- In pre-System 7 versions of the OS, I found by trial-and-error that I
- could force the Finder to update the file size and other info by
- creating a new temporary file and immediately deleting it. Somehow,
- messing with the directory entries caused the Finder to recollect its
- information about the files. Even this doesn't seem to work under
- System 7. Under System 6 and earlier, this bug/feature was particular
- annoying because copies mediated by the Finder (including duplicate,
- etc.) used the Finder's incorrect notion of the file size correct and
- did bizarre things such as spilling the progress bar outside of the
- thermometer display, rapid multiple flashing back and forth between
- reading and writing, etc.
-
- I imagine that this has come up before in this group, but I don't
- remember anything about it and there was no mention in the FAQ list.
- Any suggestions on how I can FORCE the Finder to update its info from
- within my app would be appreciated.
- - --
- David L. Swofford Phone: (217)244-6959
- Illinois Natural History Survey FAX: (217)333-4949
- 607 E. Peabody Drive BITNET: DAVESWOF@UIUCVMD
- Champaign, Illinois 61820 USA Internet: swofford@uxh.cso.uiuc.edu
-
- - ---
- * Origin: Interuniverse Gateway (ivgate), Omaha (11:30102/2.0)
- SEEN-BY: 285/1 285/14
-
- ---------------------------
-
- From: danny@utkux1.utk.edu (Danny W. McCampbell)
- Subject: Drawing a Picture in a Modal Dialog?
- Date: 12 Mar 92 18:34:47 GMT
- Organization: University of Tennessee
-
- I have a simple program where I want to draw a picture in a modal
- dialog with out having to call DrawDialog. I notice that when I
- call DrawDialog I get a flicker in the Static Text when the dialog
- is redraw. So I thought I would just draw the picture into the dialog,
- but I am unsure about how to do this since I am new to programming
- the mac. Could someone please help me out?
-
- Danny McCampbell
- danny@utkux1.utk.edu
-
- +++++++++++++++++++++++++++
-
- From: danny@utkux1.utk.edu (Danny W. McCampbell)
- Date: 13 Mar 92 13:51:02 GMT
- Organization: University of Tennessee
-
- In article <1992Mar12.183447.22633@utkux1.utk.edu>, danny@utkux1.utk.edu (Danny W. McCampbell) writes:
- >
- > I have a simple program where I want to draw a picture in a modal
- > dialog with out having to call DrawDialog. I notice that when I
- > call DrawDialog I get a flicker in the Static Text when the dialog
- > is redraw. So I thought I would just draw the picture into the dialog,
- > but I am unsure about how to do this since I am new to programming
- > the mac. Could someone please help me out?
- >
- > Danny McCampbell
- > danny@utkux1.utk.edu
- >
- Never mind, I figured it out. Thanks anyway.
-
- Danny
-
- ---------------------------
-
- From: chrisa@hpfcso.FC.HP.COM (Chris Anderson)
- Subject: List manager problem
- Date: 11 Mar 92 22:59:07 GMT
- Organization: Hewlett-Packard, Fort Collins, CO, USA
-
- Mac programmers:
-
- I know questions about the list manager have been posted here before, but I
- didn't read them because I didn't use the list manager. I am now trying to use
- the list manager, I am having problems, so NOW I AM INTERESTED. Please, would
- someone who knows, send me the answer to this possibly simple problem.
-
- Set up: Mac SE (8 MHz 68000) running under System 6.0.7; I am using Think C
- version 4.0.
-
- Here is the problem:
-
- I have a Dialog Window that has a list in it (I use LNew(...) to initialize
- it). The destination rect and the scroll bar control (vertical only) rect are
- defined in the Dialog Resource as User Items. I use Dialog_Select to look for
- mouseDown events in those items and pass the mouseDown pt (in local coords)
- along to LClick. The first problem is that the scroll bar does not respond at
- all (IM-IV implies that all of the scroll bar stuff is handled by LClick).
-
- The second problem is really weird. As long as the mouse button is down in the
- destination rect, LClick seems to work ok, as I see it highlight the list cells
- as the mouse passes over each one, and even scroll automatically when the mouse
- is moved outside the destination rect (the scroll bar's thumb even moves with
- the scrolling). Yet when I release the mouse button and call LLastClick to
- find out which list cell was last clicked in, it returns a cell number 2 OR 3
- greater than the top cell. LClick also does not seem to respond to mouseDown
- events in the last 2 OR 3 cells -- it does not highlight them.
-
- The last problem may be related to the previous one. I cannot get Think C (v
- 4.0) to correctly assign a structured function result (like Point or Cell).
- for example:
- Cell theCell;
- .
- .
- .
- theCell = LLastClick(...); /* compiler doesn't like this */
-
- What I have been able to do is coerce the function result to type long and then
- assign each element of the structure (the .h and the .v) from the high-order
- word and low-order word of the long result.
- for example:
- Cell theCell;
- long l;
- .
- .
- .
- l = (long)LLastClick(...);
- theCell.v = (int)(l >> 16);
- theCell.h = (int)(l & 0xffff); /* compiler accepts this */
-
- This seems like a kludge to me. Is there a better way (say, use a UNION)? Is
- this part of the problem of the cell numbers being 2 OR 3 greater than they
- should? I don't know.
-
- Please respond by e-mail to chrisa@hpfcswq.fc.hp.com since my connection to the
- Internet is down for an undetermined period of time, and I won't be able to
- read this news group.
-
- Chris Anderson (chrisa@hpfcswq.fc.hp.com)
-
- +++++++++++++++++++++++++++
-
- From: jack@umbio.med.miami.edu (Jack Herrington)
- Organization: University of Miami Medical School
- Date: Fri, 13 Mar 1992 00:29:54 GMT
-
- chrisa@hpfcso.FC.HP.COM (Chris Anderson) writes:
- > Yet when I release the mouse button and call LLastClick to
- >find out which list cell was last clicked in, it returns a cell number 2 OR 3
- >greater than the top cell. LClick also does not seem to respond to mouseDown
- >events in the last 2 OR 3 cells -- it does not highlight them.
-
- 1) Make sure your data rect has 0,0 as the left and top, and your data limits
- as bottom and right.
- 2) What you really want to know from LLastClick is what is selected, I guess?
- If it is, try this:
-
- Point selCell;
- selCell.h = selCell.v = 0;
- if ( LGetSelect(true,&selCell,theList) )
- {
- ...
- now you have the cell address
- ...
- }
-
- I know it makes sense to use LLastClick, but then you have to use LoWord
- and HiWord, and cast the result into a long, it's a drag. This way you make
- sure what you got is selected, too.
- - --
- "Electric word 'life', it means forever and that's a might long time. But I'm
- here to tell yah, there's something else... The after-life, a word of
- never-ending happiness, you can always see the sun, day or night. So when you
- call up that shrink in Beverly hills, you know the one, Dr. everything-we-all-
-
- +++++++++++++++++++++++++++
-
- From: chrisa@hpfcso.FC.HP.COM (Chris Anderson)
- Date: 13 Mar 92 16:21:15 GMT
- Organization: Hewlett-Packard, Fort Collins, CO, USA
-
- Mac programmers:
-
- Thank you for all of your responses. All of the problems with the List manager
- I have had are now solved.
-
- Chris Anderson (chrisa@hpfcso.fc.hp.com)
-
- ---------------------------
-
- From: putzolu@toadflax.cs.ucdavis.edu (David Putzolu)
- Subject: Help! Filling a rect with a uniform color
- Date: 13 Mar 92 03:38:11 GMT
- Organization: Department of Computer Science, University of California, Davis
-
- Help! I am trying to do a very simple thing: Fill a rect that is in an
- open window with the color stored in a variable of type RGBColor. But
- the obvious procedure, FillCRect, requires a PixPatHandle, which,
- looking at it in my IM books, I can't figure out for the life of me.
- Can anyone tell me how to do this very simple thing? Thanks in
- advance for any help....
-
- Also, let me express my gratitute to Matt Hall, Warren DeLano, and
- Bill Leue, whose suggestions were extremely helpful in dealing with
- arrays that wouldn't fit in the 32k program segment limit. Thanks
- again!
-
- | David M. A. Putzolu | putzolu@cs.ucdavis.edu |
- | Senior Undergraduate | op disclaimer(opinion : ptr mine) |
- | Computer Science and Psychology | Aiuto! Sono caduto e |
- | University of California at Davis | non posso alzarmi! |
-
- +++++++++++++++++++++++++++
-
- From: kempkec@fog.CS.ORST.EDU (Christopher Kempke)
- Date: 13 Mar 92 21:10:41 GMT
- Organization: Oregon State University, Computer Science Dept.
-
- In article <11436@ucdavis.ucdavis.edu> putzolu@toadflax.UUCP (David Putzolu) writes:
- >Help! I am trying to do a very simple thing: Fill a rect that is in an
- >open window with the color stored in a variable of type RGBColor. But
- >the obvious procedure, FillCRect, requires a PixPatHandle, which,
-
- RGBForeColor(theColor);
- PaintRect(theRect);
-
- "Fill" uses a pattern, "Paint" uses a color, "Frame" draws an outline.
-
- Hope this helps.
-
- -Chris
-
- ---------------------------
-
- From: kiran@bronze.ucs.indiana.edu (Kiran Wagle)
- Subject: iostream package for Think C?
- Date: 13 Mar 92 08:52:01 GMT
- Organization: Indiana University
-
- I would like to use Think C 5 to test some routines that depend
- heavily on simple i/o. I'd like to use the iostream routines for this,
- but they're not included with Think C.
-
- If they're written in C or C++ (which was suggested in Stroustrup's
- reference) then perhaps they could be compiled to run under think c?
-
- If anyone knows where to get source code, or has tried using them with
- think c, please send any advice you may have.
-
- Thanks in advance.
- -Kiran
-
- - --
- "The truffle is not an outright aphrodisiac, but it may in certain
- circumstances make women more affectionate and men more amiable."
- ...Brillat-Savarin
-
- +++++++++++++++++++++++++++
-
- From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
- Date: 13 Mar 92 16:22:27 GMT
- Organization: Integrated Systems Laboratory, ETH, Zurich
-
- In article <1992Mar13.085201.20665@bronze.ucs.indiana.edu> kiran@bronze.ucs.indiana.edu (Kiran Wagle) writes:
- >I would like to use Think C 5 to test some routines that depend
- >heavily on simple i/o. I'd like to use the iostream routines for this,
- >but they're not included with Think C.
-
- For good reasons...
-
- >If they're written in C or C++ (which was suggested in Stroustrup's
- >reference) then perhaps they could be compiled to run under think c?
-
- Uhm, I don't think so. Doesn't Think C abhor operator overloading and multiple
- inheritance ? iostream is inconceivable without operator overloading and The
- current implementatikon also relies on multiple inheritance.
-
- >If anyone knows where to get source code, or has tried using them with
- >think c, please send any advice you may have.
-
- There is an iostream library coming with g++. If TC could compile it (It can't
- (He He)), you could easily get it, but I'm a little unclear as to whether your
- application would fall under the General Public License, which you might not
- want to happen.
-
- Matthias
-
- - -----
- Matthias Neeracher neeri@iis.ethz.ch
- "No, what he didn't like about heroes was that they were usually
- suicidally gloomy when sober and homicidally insane when drunk."
- -- Terry Pratchett, _The Colour of Magic_
-
- +++++++++++++++++++++++++++
-
- From: tdm7695@tamsun.tamu.edu (Thomas Moriarty)
- Date: 15 Mar 92 02:27:12 GMT
- Organization: Texas A&M University
-
-
- Kiram,
-
- It is unfortunate that Think C does not have an iostream class available.
-
- As you know, Think C is produced by Symantec. Symantec acquired Zortech
- Ltd. about a year ago. Zortech does have a C++ compiler with iostream
- classes for the Macintosh. It would make good sense for Symantec to merge
- the Zortech C++ Macintosh version together with Think C. If Symantec could
- do this, they could have a new and powerful product that solves the
- deficiencies that you mentioned.
-
- - -- Tom Moriarty
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-